The present invention relates to a method for the two-dimensional pixel representation of objects on a display device based on selectable objects whose respective surfaces are divided into a plurality of polygonal surface elements.
The most common arrangements for the two-dimensional representation of objects, in particular for the representation of moving objects and/or representations from different viewing angles or on a variable scale, are those that include a data processing system and a display device controlled by the data processing system. The display device is typically a color monitor with a defined pixel raster.
To control the monitor by pixels, the data processing system (DPS) ordinarily includes a main processor, frequently referred to as the central processing unit (CPU) or simply the processor of the data processing system, as well as an image generating unit, which is designed specifically for generating pixel values and controlling the monitor and is connected to the CPU by an internal data line of the data processing system, in particular an internal bus system. An image generating unit of this type is typically designed as a graphics card that is inserted into a slot of the bus system.
Graphics cards of this type, in turn, contain memory and computing arrangements, for example another processor having multiple arithmetic units, which, however, unlike the general-purpose central processing unit (CPU), can be oriented toward and optimized for the specific image generation tasks. For example, graphics cards are commonly used which automatically generate a two dimensional representation of a three dimensional object that can be defined as a polyhedron with a specific spatial orientation and color information for the individual surface elements according to a lighting model, which, if necessary, is selected from a plurality of lighting models, and can be varied within specific limits via parameters, by means of a processing program provided in the graphics card, with the individual surfaces or surface elements being shaded in accordance with the relative orientation of the model lighting and surface elements of the object. Ordinarily, the reason for transferring processing steps from the CPU to specialized hardware components is to relieve the load on the CPU.
It has been demonstrated, particularly when varying the object representation, that computation-intensive processing operations on the graphics card as well as the amount of data to be transferred from the CPU to the graphics card over the bus system prolong the time needed to set up a new image, even in the case of limiting this data to the object data describing the polyhedron framework, making it difficult to display rapid variations or causing them to appear as sequences of jerky movements.
An object of the present invention is to provide a method for the two-dimensional pixel representation of objects on a display device which makes it possible to shorten the necessary image setup time and thus shorten the refresh time between modified image representations.
The present invention provides a method for the two-dimensional representation of objects on a display device, the display device being controlled by an image generating unit which, in turn, receives image data from a central processing unit over a data line, and, based on selectable objects whose respective surfaces are divided into a plurality of polygonal surface elements and based on a selectable lighting model, pixel values for controlling the display device being generated by performing arithmetic operations in the central processing unit and in the image generating unit. The vertices of the surface elements and pixel values for the vertices are determined in the central processing unit on the basis of the surface elements of the object and the corresponding lighting model. Coordinates and pixel values of the vertices are transferred to the image generating unit over the data line, and the pixel values of the object pixels reaching the display are generated in the image generating unit by interpolation between the pixel values of the vertices.
The present invention specifically selects a certain distribution of processing steps between the central processing unit (referred to below as CPU for short) and the image generating unit (referred to below as graphics card) and thus certain image data for transmission from the CPU to the graphics card.
The present invention speeds up the image setup time, thus shortening the image refresh times, by reducing the volume of data transferred over the internal bus system as well as by considerably reducing the computing power needed in the graphics card. The latter is achieved, in particular, by transferring to the CPU the measurement of the backscattered luminosity of the individual surface elements according to a selected lighting model (including their immediate periphery without using the bus system). The functions on the graphics card are then largely limited to transforming the three-dimensional coordinates of the surface element vertices to two-dimensional coordinates of the pixel display and interpolating the pixel values within the individual surface elements. These operations require only a small amount of computing power, making it possible to process a large volume of data per time unit in these processing steps. If different interpolation methods are available on the graphics card, an additional parameter to select an interpolation method may also be necessary.
An increase in processing speed can also be achieved by disabling the processing stage provided in the graphics card for calculating energy values based on a lighting model, which can preferably be accomplished with a control command, such as xe2x80x9cglDISABLE (GL_LIGHTNING)xe2x80x9d in the OpenGL programming language commonly used for hardware pipelines. According to one particularly advantageous embodiment of the present invention, the processing devices (memory, arithmetic units) provided in the graphics card for calculating energy values are also used for interpolation between the vertex pixel values along with the devices normally provided for interpolation within a surface element. An energy value is a quantitative measure of the intensity or luminosity of a pixel. The energy values are preferably measured in the form of value triplets for the three basic colors (red, green, and blue) and output to the display device for pixel by pixel control. The pixel values of the vertices are also advantageously transmitted as energy values for the three basic colors during transmission from the CPU to the graphics card.
Although data processing load is transferred from the graphics card to the CPU according to the present invention, this places very little extra load on the CPU when displaying an object composed of a plurality of surface elements. This is due, in particular, to the fact that a lighting model for representing an object is typically selected in the beginning, and the pixel values are determined at the vertices, as well as the fact that subsequent variations in the representation involve only varying the object viewing direction in the case of the object-related static lighting model and/or changing the scale during representation. In these operations, which appear in the monitor display in the form of a rotation or the object being zoomed in or out, respectively, and which can also be visually perceived as a variation in camera position with the object remaining stationary, the energy values advantageously remain unchanged at the vertices, while only the vertex coordinates vary. Fast algorithms, for example those that include a matrix multiplication, are available for coordinate transformations of this type, ensuring fast conversion with very little additional load on the CPU. On the whole, it is even possible to greatly reduce processing load, since sufficient storage space can be provided in the CPU memory periphery for all vertices of all surface elements and the energy values measured for them, while only the coordinate transformation of the vertices needs to be carried out for one of the object representation variations described above, while retaining the energy values that have also been stored.
Conversely, when measuring the energy values, including those of the vertices, in the conventional manner on the basis of a lighting model in the graphics card, it is no longer possible to store all vertices and their corresponding energy values on the graphics card even in the case of objects of an average complexity, which means that all vertex coordinates, including color information and orientation, must be transferred from the CPU to the graphics card with each variation as mentioned above, with the energy values being determined on the graphics card on the basis of an available lighting model.
With the method according to the present invention, the processing load normally transferred to the graphics card has to be performed in the CPU only when the lighting situation varies. Because experience has shown that lighting variations of this type constitute only a very small portion of the variations in representing an object, we can assume that the overall processing load according to the present invention is considerably reduced.
The surface elements selected for approximating even curved surfaces of an object to be represented are preferably two-dimensional triangles. It has been demonstrated that, with a representation of this type, the interpolation even on the angled intersection line of two triangles that border each other on one side produces an apparently smooth transition without emphasizing the angled line if the same energy values are applied to vertices of the two triangles coinciding with the angled line. However, a desired, abrupt shading transition of an object edge can be easily represented if the energy values of two different surfaces on either side of the surface elements assigned to the edge also differ at the vertices positioned on the edge. The surfaces of the surface elements are preferably assumed to have a perfectly diffuse backscattering effect. However, reflective properties can also be taken into account to a certain extent.